# Usage: sailho.tcl

if {![info exists eWorkDir]} {set eWorkDir [file dirname [info script]]}

package require DPeye

create {
	outputFile hundred.ps 
	mapFile hundred.map
	title "Hundred"
	creator "Mario Huys (woelpad@yahoo.com)"
	$MapDrawingScale 1 $MapUnitScale .7 $MapSupplyScale .7
	$FrameThickness 6
	images {
		chart {hundred.base.ps {scan {1147 5127 7017 13207} {} DrawMap \
			{n newpath m moveto l lineto s stroke SEA {Blue fill} ISLAND {Brown fill} gs {} gr {} Centres {}} {Black stroke Red s}} {} {3 0 0 792 1 .06}}
		coordinates {hundred.base.ps {scan {-50 0 610 480} {provinces INFO}} {} {3 0 50 343 (700/660.)/(500/480.) 700/660.}}
		centers {hundred.base.ps {scan {-50 0 610 480} {supplies TLA powers COUNTRY}} {} {3 0 50 338 (700/660.)/(500/480.) 700/660.}}
	}
	borders {
		island {image {chart Brown} LandBrown Border}
		internalBorders {image {chart Black} {} InternalBorder}
		connections {image {chart Red} {} Border {Red 3}}
	}
	locationTypes {
		Supplies {number 0 name 0 draw 1 define -1}
		Territories {number 0 name 1 populate 0 info 1}
	}
	locations {
		supplies {{centers supplies} Supplies s {Blue {} S}}
		coasts {{coordinates provinces} Territories c {Red DarkGreen AF} {
			ANG BRT CAL CAS DEV FLA {FRI -11 4} GUY HOL LON NMD PAL
			PRO SAV SCO TOU WAL
		}}
		lands {{coordinates provinces} Territories l {Green DarkGreen A} {
			ALS ANJ CAN CHA DAU DIJ LIM LOR LUX ORL PAR POI
		}}
		waters {{coordinates provinces} Territories w {White White F} {
			ATL BCH BIS DOV ECH IRI MED MIN NTH WAS
		}}
		greens {{coordinates provinces} Territories g {DarkGreen DarkGreen A} {
			ARA NUM
		}}
		beaches {{coordinates provinces} Territories b {Yellow {} F} {
			ARA/NC ARA/SC NUM/EC NUM/WC
		}}
	}
	units {
		fleet {F ManOfWar}
	}
	frame {{image .5} {chart Blue} SeaBlue FrameBorder}
	layout {corner owners} fontSize 12 
	orderHasHeading 2
	drawLayoutBorder 7 composed 0 printLayout 0 testBorder 0
	addPage 1 pageContents0 {
		"\{"

		"200 40 DrawFleet"
		"200 40 180 140 ArrowPropose"
		"200 40 100 20 ArrowRetreat"
		"200 40 300 60 ArrowMove"
		
		"180 140 DrawArmy"
		"ProposePhase"
		"180 140 160 240 ArrowMove"
		"RetreatPhase"
		"180 140 80 120 ArrowMove"
		"MovePhase"
		"180 140 280 160 ArrowMove"

		"300 90 DrawFleet"
		"300 90 200 40 180 140 ArrowSupport"
		"300 120 DrawArmy"
		"300 120 180 140 ArrowHold"
		"300 150 DrawFleet"
		"300 150 180 140 160 240 ArrowConvoy"

		"\} dup exec -40 200 translate FailedOrder exec OkOrder 40 -200 translate"
				
		"400 200 DrawFleet"
		"400 200 ArrowArrive"
		"400 230 DrawArmy"
		"400 230 ArrowDepart"
		"400 260 DrawFleet"
		"400 260 ArrowRetreatArrive"
		"400 290 DrawArmy"
		"400 290 ArrowRetreatDepart"
		
		"500 200 DrawFleet"
		"500 200 BuildUnit"
		"500 230 DrawArmy"
		"500 230 DestroyUnit"
		"500 260 DrawFleet"
		"500 260 DisbandUnit"
		"500 290 DrawArmy"
		"500 290 RemoveUnit"
		"500 320 DrawFleet"
		"500 320 FindUnit"
		"500 350 DrawArmy"
		"500 350 LoseUnit"
		"500 380 DrawFleet"
		"500 380 QueryUnit"
    }
}
